﻿namespace TfsExtensions.Helper.Configuration
{
    using System;
    using System.Configuration;

    /// <summary>
    /// Defines Configuration Element Details for Exception Handling Policy Element within DeploymentFrameworkSection
    /// </summary>
    public sealed class ExceptionHandlingPolicyElement : ConfigurationElement
    {
        #region Properties

        /// <summary>
        /// Gets or sets the name of the policy.
        /// </summary>
        /// <value>The name of the policy.</value>
        [ConfigurationProperty("policyName", DefaultValue = "")]
        public string PolicyName
        {
            get
            {
                return (string) base["policyName"];
            }

            set
            {
                if (value == null)
                {
                    throw new ArgumentNullException("value");
                }

                base["policyName"] = value;
            }
        }

        #endregion
    }
}